from tablewindow import TableWindow



class ModuleWindow(TableWindow):
    TITLE = 'Modules'

    def __init__(self, parent=None):
        super(ModuleWindow, self).__init__(parent, 'Base Size Entry Name FileVersion Path'.split())

    def update_modules(self, process):
        self.delete_all_items()
        for module in process.iter_modules():
            self.add_item(
                '%08X' % (module.get_base() or 0),
                '%08X' % (module.get_size() or 0),
                '%08X' % (module.get_entry_point() or 0),
                module.get_filename() or '???'
            )

            
             
